package com.fick.filter;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.fick.hibernate.dao.NewsDAO;
import com.fick.hibernate.model.News;
public class RateFilter implements Filter {
	private Log log = LogFactory.getLog(RateFilter.class);
	protected String encoding = null;

	protected FilterConfig filterConfig = null;

	protected boolean ignore = true;

	public void destroy() {
		this.encoding = null;
		this.filterConfig = null;
	}

	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
			ServletException {

		HttpServletRequest httprequest = (HttpServletRequest) request;



		chain.doFilter(request, response);

	}

	public void init(FilterConfig filterConfig) throws ServletException {

	}

	// ͳ���ַ���ĳ�ַ����
	private int num(String uri) {
		char[] c = uri.toCharArray();
		int n = 0;
		for (int i = 0; i < c.length; i++) {
			if (c[i] == '/') {
				n++;
			}
		}
		return n;
	}

}
